Scaling

Scaling of position, velocity, and acceleration values are calculated differently depending on the setting of CANOPEN.WORKBENCHUNITS. When this is set to 0 (default), the CANopen scaling factors are used described below. When set to 1, the units defined by AXIS#.UNIT.* keywords (AXIS#.UNIT.PROTARY , AXIS#.UNIT.VROTARY , etc) will be used. The scale factors selected will be applied to all CANOpenClosedCANopen is a communication protocol and device profile specification for embedded systems used in automation for fieldbuses working in real time objects, including manufacturer specific and drive profile objects.


  • For ease of use, it is recommended leaving CANOPEN.WORKBENCHUNITS at 0 to use CANopen scaling. When this is set to 1, the values returned by fieldbus objects may or may not be scaled 1000:1 to improve resolution. See CANopen Object Table for which values are scaled 1:1 vs 1000:1 if WorkBench scaling is used.

CANopen Position Scaling using 6091h/6092h

CANopen position scaling concept diagram:

The calculation of the position values is done by the following formula:

position value = (position internal value * feed constant) / (position encoder resolution * gear ratio)

The position internal value is given in internal units (encoder increments). For calculation of the position internal values from the target position values, the formula is transposed to:

position internal value = (position value * position encoder resolution * gear ratio) / feed constant

To simplify the conversion, one can leave gear ratio (0x6091S1 and 0x6091S2) and feed constant revolutions (0x6092S2) set to 1 and only modify the feed (0x6092S1) as number of units per revolution desired: position user value = position internal value * feed / encoder resolution. If units in degrees are desired, set feed (0x6092S1) to 360 units per revolution.

6091h – Gear Ratio

This object defines the number of motor shaft revolutions per driving shaft revolution. The gear ratio is calculated by the following formula:

gear ratio = motor shaft revolutions / driving shaft revolutions
Index Sub-Index Data Type    
6091h, 6891h Gear ratio - Axis # 0 Unsigned8 Highest sub-index supported (always 3)  
1 Unsigned32 Motor revolutions - Axis 1 AXIS#.CANOPEN.GEARPRIMARY.MOTORREV
2 Unsigned32 Shaft revolutions - Axis 1 AXIS#.CANOPEN.GEARPRIMARY.SHAFTREV

6092h – Feed Constant

This object defines the ratio of feed in position units per driving shaft revolutions. The feed constant is calculated by the following formula:

feed constant = feed / driving shaft revolutions
Index Sub-Index Data Type    
6092h, 6892h Feed constant - Axis # 0 Unsigned8 Highest sub-index supported (always 3)  
1 Unsigned32 Feed - Axis 1 AXIS#.CANOPEN.FCPRIMARY.FEED
2 Unsigned32 Shaft revolutions - Axis 1 AXIS#.CANOPEN.FCPRIMARY.SHAFTREV

Position Counts (actual position internal 6063h)

Position encoder resolution used in the above calculations is always 2^32 counts/revolution for the internal AKD2G position values regardless of the actual feedback resolution. When reading certain CANopen values that are given in internal units, use AXIS#.CANOPEN.PSCALE to control the resolution of the user value. The value presented via CANopen is shifted by the number of bits specified by the PSCALE parameter.

Value = (CANopen value) / 2^(AXIS#.CANOPEN.PSCALE)

CANopen Velocity Scaling Using 6096h

All velocity values over CANopen use the scaling defined by object 6096h, velocity factor. Velocity values are presented as position units/s, where position units are defined by the objects above (6091h/6092h).

Velocity factor = Velocity Numerator / Velocity Denominator
Velocity value = ((velocity internal value * feed constant) / (encoder 
resolution * gear ratio)) * velocity factor

or:
Velocity value = (position value / sec) * velocity factor
Index Sub-Index Data Type  
6096h, 6896h Velocity factor - Axis # 0 Unsigned8 Highest sub-index supported (always 3)
1 Unassigned32 Velocity Factor Numerator - Axis 1
2 Unassigned32 Velocity Factor Denominator - Axis 1

  • To get a velocity in revs per second, make the denominator equal counts per rev and to get revs per minute, also set numerator to seconds in a minute (See examples).

CANopen Acceleration Scaling Using 6097h

All acceleration values over CANopen use the scaling factor defined by object 6097h, acceleration factor. Acceleration values are presented as velocity units/s, where velocity units are defined by the objects above (6091/6092/6096h).

 

Index Sub-Index Data Type    
6097h, 6897h Acceleration factor - Axis # 1 Unsigned32 Acceleration Factor Numerator – Axis 1 AXIS#.CANOPEN.ACCSCALENUM
2 Unsigned32 Acceleration Factor Denominator – Axis 1 AXIS#.CANOPEN.ACCSCALEDENOM

Examples

CANOPEN.WORKBENCHUNITS = 0 (default, recommended setting)

Position units in default 2^16 counts/rev. Velocity units in default counts/s.

0x6091S1 = 1 (motor revs)
0x6091S2 = 1 (shaft revs)
0x6092S1 = 65536 (feed)
0x6092S2 = 1 (shaft revs)
0x6096S1 = 1 (velocity factor numerator)
0x6096S2 = 1 (velocity factor denominator)

To give a target position of 180 degrees, one would command object 607Ah to 32768 counts:

CANClosed"Controller area network"
CAN is a broadcast, differential serial bus standard developed for connecting electronic control units. Each node is able to send and receive messages, but not simultaneously user value = (2^16 counts/rev / 360 deg/rev) * desired position -> 
182.0444 counts/deg * 180 deg = 32768 counts

To give a target velocity of 100 rpm, one would command object 60FFh to 109227 counts/s. The desired RPMClosed"Revolutions per minute" Is a unit of frequency of rotation: the number of full rotations completed in one minute around a fixed axis. It is used as a measure of rotational speed of a mechanical component is first converted into RPS to match the per second nature of CANopen velocity units and then multiplied by the number of counts per rev to give us the counts per second value needed.

CAN user value = (100 rpm / 60 sec/m) * 65536 counts/rev = 1.6667 rps * 65536 counts/rev = 109266.6667

Position units in 1000*deg. Velocity units in rpm.

0x6091S1 = 1 (motor revs)
0x6091S2 = 1 (shaft revs)
0x6092S1 = 36000 (feed) – 360 deg * 1000 to get some extra resolution
0x6092S2 = 1 (shaft revs)
0x6096S1 = 60 (velocity factor numerator) – seconds in a minute to convert counts per second to counts per minute
0x6096S2 = 36000 (velocity factor denominator) – counts per rev to convert counts per second to revs per second

To give a target position of 180 degrees, one would command object 607Ah to 18000:

CAN user value = (36000 counts/rev / 360 deg/rev) * desired position ->
100 counts/deg * 180 deg = 18000 counts

To give a target velocity of 100 rpm, one would command object 60FFh to 100 rpm. The desired RPM is first converted into RPS to match the per second nature of CANopen velocity units and then multiplied by the number of counts per rev to give us the counts per second value needed. Then we apply the velocity factor to the counts per second value, which gives us the RPM.

CAN user value = (100 rpm / 60 sec/m) * 36000 counts/rev * velocity factor = 
1.6667 rps * 36000 counts/rev * 60/36000 = 100rpm

CANOPEN.WORKBENCHUNITS = 1 (legacy, not recommended)

Position in degrees (note the loss in resolution by using this method with only a full degree worth of resolution available). Velocity in rpm.

CANopen scaling objects ignored

UNIT.PROTARY = degrees

UNIT.VROTARY = rpm

To give a target position of 180 degrees, one would command object 607Ah to 180.

To give a target velocity of 100rpm, one would command object 60FFh to 100.